package com.appkubes.mall.core.pojo;

import com.appkubes.mall.core.po.MallUserBankCards;
import com.appkubes.mall.core.po.MallUserBankCardsExample;
import java.util.List;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.DeleteProvider;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.Update;
import org.apache.ibatis.annotations.UpdateProvider;
import org.apache.ibatis.session.RowBounds;
import org.apache.ibatis.type.JdbcType;

public interface MallUserBankCardsMapper {
    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_user_bank_cards
     *
     * @mbg.generated
     */
    @SelectProvider(type=MallUserBankCardsSqlProvider.class, method="countByExample")
    long countByExample(MallUserBankCardsExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_user_bank_cards
     *
     * @mbg.generated
     */
    @DeleteProvider(type=MallUserBankCardsSqlProvider.class, method="deleteByExample")
    int deleteByExample(MallUserBankCardsExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_user_bank_cards
     *
     * @mbg.generated
     */
    @Delete({
        "delete from mall_user_bank_cards",
        "where user_bank_card_key = #{userBankCardKey,jdbcType=VARCHAR}"
    })
    int deleteByPrimaryKey(String userBankCardKey);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_user_bank_cards
     *
     * @mbg.generated
     */
    @Insert({
        "insert into mall_user_bank_cards (user_bank_card_key, app_key, ",
        "user_key, bank_card_number, ",
        "bank_card_name, bank_bind_phone, ",
        "bank_card_username, version)",
        "values (#{userBankCardKey,jdbcType=VARCHAR}, #{appKey,jdbcType=VARCHAR}, ",
        "#{userKey,jdbcType=VARCHAR}, #{bankCardNumber,jdbcType=VARCHAR}, ",
        "#{bankCardName,jdbcType=VARCHAR}, #{bankBindPhone,jdbcType=VARCHAR}, ",
        "#{bankCardUsername,jdbcType=VARCHAR}, #{version,jdbcType=INTEGER})"
    })
    int insert(MallUserBankCards record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_user_bank_cards
     *
     * @mbg.generated
     */
    @InsertProvider(type=MallUserBankCardsSqlProvider.class, method="insertSelective")
    int insertSelective(MallUserBankCards record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_user_bank_cards
     *
     * @mbg.generated
     */
    @SelectProvider(type=MallUserBankCardsSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="user_bank_card_key", property="userBankCardKey", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="app_key", property="appKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="user_key", property="userKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="bank_card_number", property="bankCardNumber", jdbcType=JdbcType.VARCHAR),
        @Result(column="bank_card_name", property="bankCardName", jdbcType=JdbcType.VARCHAR),
        @Result(column="bank_bind_phone", property="bankBindPhone", jdbcType=JdbcType.VARCHAR),
        @Result(column="bank_card_username", property="bankCardUsername", jdbcType=JdbcType.VARCHAR),
        @Result(column="version", property="version", jdbcType=JdbcType.INTEGER)
    })
    List<MallUserBankCards> selectByExampleWithRowbounds(MallUserBankCardsExample example, RowBounds rowBounds);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_user_bank_cards
     *
     * @mbg.generated
     */
    @SelectProvider(type=MallUserBankCardsSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="user_bank_card_key", property="userBankCardKey", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="app_key", property="appKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="user_key", property="userKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="bank_card_number", property="bankCardNumber", jdbcType=JdbcType.VARCHAR),
        @Result(column="bank_card_name", property="bankCardName", jdbcType=JdbcType.VARCHAR),
        @Result(column="bank_bind_phone", property="bankBindPhone", jdbcType=JdbcType.VARCHAR),
        @Result(column="bank_card_username", property="bankCardUsername", jdbcType=JdbcType.VARCHAR),
        @Result(column="version", property="version", jdbcType=JdbcType.INTEGER)
    })
    List<MallUserBankCards> selectByExample(MallUserBankCardsExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_user_bank_cards
     *
     * @mbg.generated
     */
    @Select({
        "select",
        "user_bank_card_key, app_key, user_key, bank_card_number, bank_card_name, bank_bind_phone, ",
        "bank_card_username, version",
        "from mall_user_bank_cards",
        "where user_bank_card_key = #{userBankCardKey,jdbcType=VARCHAR}"
    })
    @Results({
        @Result(column="user_bank_card_key", property="userBankCardKey", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="app_key", property="appKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="user_key", property="userKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="bank_card_number", property="bankCardNumber", jdbcType=JdbcType.VARCHAR),
        @Result(column="bank_card_name", property="bankCardName", jdbcType=JdbcType.VARCHAR),
        @Result(column="bank_bind_phone", property="bankBindPhone", jdbcType=JdbcType.VARCHAR),
        @Result(column="bank_card_username", property="bankCardUsername", jdbcType=JdbcType.VARCHAR),
        @Result(column="version", property="version", jdbcType=JdbcType.INTEGER)
    })
    MallUserBankCards selectByPrimaryKey(String userBankCardKey);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_user_bank_cards
     *
     * @mbg.generated
     */
    @UpdateProvider(type=MallUserBankCardsSqlProvider.class, method="updateByExampleSelective")
    int updateByExampleSelective(@Param("record") MallUserBankCards record, @Param("example") MallUserBankCardsExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_user_bank_cards
     *
     * @mbg.generated
     */
    @UpdateProvider(type=MallUserBankCardsSqlProvider.class, method="updateByExample")
    int updateByExample(@Param("record") MallUserBankCards record, @Param("example") MallUserBankCardsExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_user_bank_cards
     *
     * @mbg.generated
     */
    @UpdateProvider(type=MallUserBankCardsSqlProvider.class, method="updateByPrimaryKeySelective")
    int updateByPrimaryKeySelective(MallUserBankCards record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_user_bank_cards
     *
     * @mbg.generated
     */
    @Update({
        "update mall_user_bank_cards",
        "set app_key = #{appKey,jdbcType=VARCHAR},",
          "user_key = #{userKey,jdbcType=VARCHAR},",
          "bank_card_number = #{bankCardNumber,jdbcType=VARCHAR},",
          "bank_card_name = #{bankCardName,jdbcType=VARCHAR},",
          "bank_bind_phone = #{bankBindPhone,jdbcType=VARCHAR},",
          "bank_card_username = #{bankCardUsername,jdbcType=VARCHAR},",
          "version = #{version,jdbcType=INTEGER}",
        "where user_bank_card_key = #{userBankCardKey,jdbcType=VARCHAR}"
    })
    int updateByPrimaryKey(MallUserBankCards record);
}